#!/bin/bash
# Picks the native Python (Apple silicon or Intel) and starts the launcher.
R="$(cd "$(dirname "$0")/../Resources" && pwd)"
if [ "$(sysctl -n hw.optional.arm64 2>/dev/null)" = "1" ]; then A=arm64; else A=x86_64; fi
PY="$R/python-$A/bin/python3"
export EMBERHOLT_ASSETS="$R/assets" PYTHONPATH="$R/app" PYTHONDONTWRITEBYTECODE=1
if [ "$A" = arm64 ]; then exec arch -arm64 "$PY" -s -m emberholt_mac "$@"; else exec "$PY" -s -m emberholt_mac "$@"; fi
